﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace VetumaForSP2010.Configuration
{
    public class RegistrationConfig : ConfigurationElement
    {
        [ConfigurationProperty("UserStore", IsRequired = true)]
        public string UserStore
        {
            get
            {
                if (this["UserStore"] != null)
                {
                    return this["UserStore"].ToString();
                }
                else
                {
                    throw new NullReferenceException("UserStore property missing from web.config.");
                }
            }
        }

        [ConfigurationProperty("VFSKey", IsRequired = true)]
        public Guid VFSKey
        {
            get
            {
                if (this["VFSKey"] != null)
                {
                    return new Guid(this["VFSKey"].ToString());
                }
                else
                {
                    throw new NullReferenceException("VFSKey property missing from web.config.");
                }
            }
        }

        [ConfigurationProperty("Provider", IsRequired = true)]
        public string Provider
        {
            get
            {
                if (this["Provider"] != null)
                {
                    return this["Provider"].ToString();
                }
                else
                {
                    throw new NullReferenceException("Provider property missing from web.config.");
                }
            }
        }

        public RegistrationConfig() { }

    }
}
